package io.kiki.stack.http.feign;

/**
 * Contract for delegation to the rest of the chain.
 */
public interface ResponseInterceptorChain {
    ResponseInterceptorChain DEFAULT = InvocationContext::proceed;

    /**
     * Delegate to the rest of the chain to execute the request.
     *
     * @param context the request to execute the {@link ResponseInterceptorChain} .
     * @return the response
     */
    Object next(InvocationContext context) throws Exception;
}
